<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>15.元素可⽤空间分配</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    body {
      padding-left: 50px;
      padding-top: 15px;
    }



    article {
      border: solid 5px silver;
      width: 550px;
      height: 100px;
      display: flex;
      flex-direction: row;
    }
    article div:nth-child(1){
      flex-grow: 0;
    }
    article div:nth-child(2){
      flex-grow: 2;
    }
    article div:nth-child(3){
      flex-grow: 1;
    }

    article div {
      /* flex-grow: 1;*/
      width: 100px;
      height: 100px;
      border: solid 1px blueviolet;
      padding: 10px;
      background-clip: content-box;
      -webkit-background-clip: content-box;
      box-sizing: border-box;
      background-color: rgba(255, 0, 0, 0.5);
      font-size: 35px;
      color: white;
    }
    
  </style>
</head>

<body>
  <article>
    <div>1</div>
    <div>2</div>
    <div>3</div>
  </article>
</body>

</html>